package com.science.slam.exception;


import lombok.Getter;

@Getter
public enum ErrorCode {
    PARAMS_PASSWD_ERROR(40002, "参数错误"),
    PARAMS_NULL(40001, "参数为空"),
    USER_EXITS(40003, "用户已经注册"),
    COUNT_REPEAT(40004, "账号重复"),
    REGISTER_FAILED(40005, "注册失败"),
    FILE_NOT_EXISTS(40006, "文件不存在"),
    FILE_ACCESS_DENIED(40007, "文件读取错误"),
    NO_PERMISSIONS(40008, "权限不足"),
    FILE_NUM_BIG(40010, "文件数量超过上限"),
    NOT_LOGIN(40011, "未登录"),
    PHONE_ERROR(40009, "电话号码不存在"),
    EDIT_FAIL(40013, "信息修改失败"),
    CANNOT_EDIT(40014, "该属性不可修改"),
    SERVER_ERROR(30001, "服务器错误"),
    DATABASE_ERROR(30002, "数据库错误");

    final Integer code;
    final String message;

    ErrorCode(Integer code, String message) {
        this.code = code;
        this.message = message;
    }
}
